package com.cjkj.equipment.domain;

import java.util.Date;

import com.cjkj.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 设备信息对象 equipment
 * 
 * @author cjkj
 * @date 2024-08-15
 */
public class Equipment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 设备号 */
    private String equipmentNo;

    /** 设备类型 */
    private String equipmentType;

    /** 0未激活 1已激活 */
    private Integer status;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 设备状态: 0=在线；1=离线； */
    private Integer equipmentStatus;

    /** 最后一次上线时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastOnlineTime;

    /** 最后一次下线时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastOfflineTime;

    /** 0=设备正常；1=设备故障 */
    private Integer restHeart;

    /** 设备故障时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date failureStartTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setEquipmentNo(String equipmentNo) 
    {
        this.equipmentNo = equipmentNo;
    }

    public String getEquipmentNo() 
    {
        return equipmentNo;
    }

    public void setEquipmentType(String equipmentType) 
    {
        this.equipmentType = equipmentType;
    }

    public String getEquipmentType() 
    {
        return equipmentType;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setEquipmentStatus(Integer equipmentStatus) 
    {
        this.equipmentStatus = equipmentStatus;
    }

    public Integer getEquipmentStatus() 
    {
        return equipmentStatus;
    }

    public void setLastOnlineTime(Date lastOnlineTime) 
    {
        this.lastOnlineTime = lastOnlineTime;
    }

    public Date getLastOnlineTime() 
    {
        return lastOnlineTime;
    }

    public void setLastOfflineTime(Date lastOfflineTime) 
    {
        this.lastOfflineTime = lastOfflineTime;
    }

    public Date getLastOfflineTime() 
    {
        return lastOfflineTime;
    }

    public void setRestHeart(Integer restHeart) 
    {
        this.restHeart = restHeart;
    }

    public Integer getRestHeart() 
    {
        return restHeart;
    }

    public void setFailureStartTime(Date failureStartTime) 
    {
        this.failureStartTime = failureStartTime;
    }

    public Date getFailureStartTime() 
    {
        return failureStartTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("equipmentNo", getEquipmentNo())
            .append("equipmentType", getEquipmentType())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("endTime", getEndTime())
            .append("equipmentStatus", getEquipmentStatus())
            .append("lastOnlineTime", getLastOnlineTime())
            .append("lastOfflineTime", getLastOfflineTime())
            .append("restHeart", getRestHeart())
            .append("failureStartTime", getFailureStartTime())
            .toString();
    }
}
